package com.example.springbooteasycode.zjrc.project.Koal.AAAstructure;

/**
 * 加密机返回错误码
 */
public class ErrorCodes {
    // 执行成功或者验证成功
    public static final int ERR_RES_NONE = 0;
    // 输入参数验证失败(包括验证参数的取值范围、buffer大小及指针是否为空)
    public static final int ERR_PARAMETER = 1;
    // 无效的密钥(包含PK, MAK, KEK, PK, SK)
    public static final int ERR_KEY = 2;
    // 向加密机发送数据失败
    public static final int ERR_CMD_SEND = 3;
    // 接收加密机数据超时
    public static final int ERR_CMD_TIMEOUT = 4;
    // 接收到的数据格式错
    public static final int ERR_RES_DATA = 5;
    // 明文数据格式错
    public static final int ERR_PDATA = 6;
    // 读取密钥错误
    public static final int ERR_RDATA = 7;
    // 打印密钥错误(或保存IC卡失败)
    public static final int ERR_PRINTKEY = 8;
    // 其他错误
    public static final int ERR_OTHER = 9;
    // 执行失败或匹配失败
    public static final int ERR = 10;

    // ======================================最终封装响应体返回的相关错误码================================
    public static final int ERR_BASE_HSMERR = 0x7000;

    public static final int ERR_BASE_COMMAND = 0x5000;

    public static final int ERR_RECV_CMDCODE = ERR_BASE_COMMAND + 0x2;
}
